
{extend name='public/window' /}

{block name="content"}
<style>
    .layui-upload-drag {
        position: relative;
        padding: 10px;
        border: 1px dashed #e2e2e2;
        background-color: #fff;
        text-align: center;
        cursor: pointer;
        color: #999;
        border-radius: 50%;
    }
    .layui-form-label{
        width: 110px;
    }
    .layui-input-block{
        width: 85%;
        margin-left: 146px;
    }
    .layui-input, .layui-textarea {
        display: block;
        width: 80%;
        padding-left: 10px;
    }
    /* .layui-form-select {
        position: absolute;
        right: 165px;
        top: 50%;
        } */
    .layui-form-select .layui-edge {
        position: absolute;
        right: 170px !important;
        top: 50%;
    }
    .layui-form-select dl {
        min-width: 80% !important;
    }
    .layui-form-label {
        width: 116px !important;
    }
</style>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body" style="padding: 15px;">
            <form class="layui-form" action="" lay-filter="form">
                {if isset($info.id)}
                <input type="hidden" name="id" value="{$info.id}">
                {/if}
                <input type="hidden" name="__token__" id="token" value="{:token()}"/>
                <div class="layui-form-item nolins" >
                    <label class="layui-form-label">姓名 </label>
                    <div class="layui-input-block">
                        <input type="text" name="name" lay-verify="required" disabled autocomplete="off"
                               placeholder="请输入姓名" class="layui-input" id="merchant_sn_edit">
                    </div>
                </div>
                <div class="layui-form-item nolins">
                    <label class="layui-form-label">手机号 </label>
                    <div class="layui-input-block">
                        <input type="text" name="mobile" disabled autocomplete="off"
                               placeholder="请输入手机号" class="layui-input" id="company_edit">
                    </div>
                </div>
                {if !empty($info['idcard_z'])}
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证正面 *</label>
                    <div style="display:flex;align-items: center;padding-top: 10px;flex-wrap: wrap">

                        <div style="margin-right: 10px">
                            <img src="{$info['idcard_z']}"  onclick="previewImg(this)" alt="" style="display: inline-block;width:300px;height: 200px">
                        </div>

                    </div>
                </div>
                {/if}
                {if !empty($info['idcard_f'])}
                <div class="layui-form-item">
                    <label class="layui-form-label">身份证反 *</label>
                    <div style="display:flex;align-items: center;padding-top: 10px;flex-wrap: wrap">

                        <div style="margin-right: 10px">
                            <img src="{$info['idcard_f']}"  onclick="previewImg(this)" alt="" style="display: inline-block;width:300px;height: 200px">
                        </div>

                    </div>
                </div>
                {/if}
                {if !empty($info['health_certificate'])}
                <div class="layui-form-item">
                    <label class="layui-form-label">健康证照片 *</label>
                    <div style="display:flex;align-items: center;padding-top: 10px;flex-wrap: wrap">

                        <div style="margin-right: 10px">
                            <img src="{$info['health_certificate']}"  onclick="previewImg(this)" alt="" style="display: inline-block;width:300px;height: 200px">
                        </div>

                    </div>
                </div>
                {/if}
            </form>
        </div>
    </div>
</div>


<script>
    layui.use(['element', 'form', 'jquery','lucky','upload','laydate','xmSelect'], function () {
        var element = layui.element;
        var table = layui.table;
        var form = layui.form;
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var lucky=layui.lucky;
        var xmSelect = layui.xmSelect;
        form.on('select(type)', function(data){
            var  type = data.value;
            if(type==2){
                $(".nolins").css('display','none'); //隐藏
            }else{
                $(".nolins").css('display','block');
            }
        });
        //表单赋值
        var info = {:json_encode($info)};
        form.val("form",info);
        form.on('submit(add)', function (data) {
            lucky.FormSubmit("{:url('updatePassword')}",data.field,true);
            return false;
        });
    })
</script>

{/block}

